{{ if .Site.Params.widgets.tags }}
{{ if isset .Site.Taxonomies "tags" }}
{{ if not (eq (len .Site.Taxonomies.tags) 0) }}

<div class="card card-block">
  <h4 class="card-title">TAGS</h4>
  <div class="card-text">
    <div class="widget">
      <ul>
        {{ range $name, $items := .Site.Taxonomies.tags }}
          <li>
            <a href="{{ (print "tags/" ($name | urlize | lower) "/") | relURL }}">{{ $name }}</a>
            <span class="category-list-count">{{ len $items }}</span>
          </li>
        {{ end }}
      </ul>
    </div>
  </div>
</div>
{{ end }}
{{ end }}
{{ end }}
